var status = -1;
var selectionLog = [];

function start(c, b, a) {}

function end(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status == a++) {
            cm.forceCompleteQuest();
            cm.addNumberForQuestInfo(15708, "cq", 1);
            cm.gainExp(40000000);
            cm.sendNormalTalk("这确实是#r我部下们的东西#k……\r\n多亏了你，部下们的灵魂终于获得了#b永远的安息#k……", 4, 1540895, false, true);
            cm.gainItem(4001868, 2)
        } else {
            if (status === a++) {
                cm.sendNormalTalk("来，这是我们#b说好的礼物#k。\r\n#i4001868:# #b#t4001868##k\r\n谢谢你能够帮忙遏制这个我们种族所播下的#r恶种#k……", 4, 1540895, true, false)
            } else {
                if (status === a++) {
                    cm.dispose()
                }
            }
        }
    }
};